<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.lmpop.frame.util.PageTools" %>
<%@ page import="com.lmpop.trade.ti_normal_biz_model.*"%>
<%@ page import="com.lmpop.trade.tb_unionmodelinfo.*"%>
<%@ page import="com.lmpop.trade.ti_attach.Ti_attachInfo" %>
<script type="text/javascript" src="/templets/html/jinseys/js/lianhesw_inquiry.js"></script>
<style type="text/css">
table{
	width:100%;
	margin:0px auto;
	font:Georgia 12px;
	color:#333333;
	text-align:center;
	border-collapse:collapse;
}
table td{
	border-bottom:1px  DASHED #006F00;	 
}
table th{
	border-bottom:3px  DASHED #006F00;	 
}
</style>

<%
	request.setCharacterEncoding("UTF-8");
	 
	Tb_unionmodelinfoInfo tb_unionmodelinfoinfo= new Tb_unionmodelinfoInfo();
	Hashtable tb_unionmodelinfo = new Hashtable();
	
	String cust_id = "", user_id="";	
	if( session.getAttribute("session_cust_id") != null ){
		 cust_id = session.getAttribute("session_cust_id").toString();
	}
	if(session.getAttribute("session_user_id")!=null){
	   user_id = session.getAttribute("session_user_id").toString();
	}
	
	String biz_id = "",trade_id = "";
	if(request.getParameter("biz_id")!=null){
		biz_id = request.getParameter("biz_id");		 
	}
	if(request.getParameter("trade_id")!=null){
		trade_id = request.getParameter("trade_id");		 
	}
	 
	 
  tb_unionmodelinfo.put("order_no",trade_id);
		
	Ti_attachInfo  ti_attachInfo = new Ti_attachInfo(); 
	String iStart = "0";
	int limit = 10;
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	List list = tb_unionmodelinfoinfo.getListByPage(tb_unionmodelinfo,Integer.parseInt(iStart),limit);
	int counter = tb_unionmodelinfoinfo.getCountByObj(tb_unionmodelinfo);
	String pageString = new PageTools().getGoogleToolsBar(counter,"modellist.jsp?trade_id="+trade_id+"&iStart=",Integer.parseInt(iStart),limit);
%>
<html>
  <head>
    
    <title>批发订单明细</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="/js/commen.js"></script>
	<script type="text/javascript" src="inquiry.js"></script>
</head>
<body>
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td width="90%">
				<h1>批发订单明细</h1>
			</td>
			<td>
				<!--<a href="addInfo.jsp"><img src="/program/company/index/images/post.gif" /></a>-->
			</td>
		</tr>
	</table>
		<table width="90%" cellpadding="1" cellspacing="1" class="listtab" border="0">
		<tr> 				 
		  	<th>图片</th>
		  	<th>名称</th>
		  	<th>价格</th>
		  	<th>订购数量</th>
		  
		</tr>
		
		
		<% 
			if (list!=null && list.size()>0)
			{
			Hashtable map = new Hashtable();
			for(int i=0;i<list.size();i++){
				map = (Hashtable)list.get(i);
				String model_name="",order_num="",total_price="",model_id="";
			 		if(map.get("model_id")!=null) model_id = map.get("model_id").toString();
					if(map.get("order_num")!=null) order_num = map.get("order_num").toString();
					if(map.get("total_price")!=null) total_price = map.get("total_price").toString();
					if(map.get("rsrv_str1")!=null) model_name = map.get("rsrv_str1").toString();
					 
					String img_path =  ti_attachInfo.getFilePathByAttachrootid(model_id);
            
					if(img_path.equals("")){
						 img_path ="/program/admin/images/cpwu.gif";            
					}   
					
					 
		  %>
		
		<tr>			
				<td width="10%"><img src="<%=img_path%>" border="0" width="150" height="150" /></td>
		  	<td width="30%"><%=model_name%></td>
		   
		  	<td width="10%"><%=total_price%></td>
		  	<td width="15%"><%=order_num%>&nbsp;</td>		  	
		  	 
		</tr>
		
		  <%
		  		}
		  	}
		  %>
		
	</table>
	
 
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tablehe">
		<tr><td><%=pageString%></td></tr>
	</table>
	  
</body>
</html>